/**
 * @ author: 汪孟苹
 */
define(["jquery","bbcare","comm/datatable/datatable","bch/app/kindergartenManager/kindergartenChildList.servers"],function($,$bb,$datatable,$servers) {
    var childList = {};

    /**
     * 点击添加患者
     */
    var onAddPatient = function(){
        var params = $bb.getPageParams();
        var arg = {
            "queueId":params.queueId,
            "schemeId":params.schemeId,
            "busiTypeList":params.busiTypeList,
            "subBusiTypeList":params.subBusiTypeList,
            "title":"添加入园入托体检",
            "prevRoute":"bch_kindergartenChildList"
        };
        var domId = $(this).attr("id");
        $bb.open(params,domId,"bch_addPatient_hide",arg);
    }

    childList.init = function(){
        // 添加患者
        $("#addPatient").unbind("click");
        $("#addPatient").click(onAddPatient);
        // datatable
        var id = $(".layout-bottom table").attr("id");
        $datatable.init({
            "id": id,
            "options": $servers.getOptions()
        });
    }

    return childList;
});